package com.le.tester.designmode.openclose;

import org.springframework.scheduling.support.SimpleTriggerContext;

import java.math.BigDecimal;

/**
 * createTime：2022/8/30 14:28
 * description：Java Course
 */
public class JavaCourse implements Course {

    Long id;

    String name;

    BigDecimal price;

    public JavaCourse(Long id, String name, BigDecimal price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    @Override
    public Long getId() {
        return this.id;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public BigDecimal getPrice() {
        return this.price;
    }

    @Override
    public BigDecimal getDiscountPrice() {
        return this.getPrice().multiply(BigDecimal.valueOf(0.8d));
    }
}
